import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import api from "./api";
import * as filters from "./utils/filters";
import "@/styles/reset.css";
import "@/utils/dialogDra";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import "@/styles/commonElementUI.scss";

Vue.config.productionTip = false;

// 全局过滤器挂载
Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key]);
});

Vue.use(api);
Vue.use(ElementUI);

new Vue({
  router,
  store,
  beforeCreate() {
    Vue.prototype.$bus = this; //安装全局事件总线
  },
  render: (h) => h(App),
}).$mount("#app");
